#ifndef GAMMAMANAGERWAYLAND_H
#define GAMMAMANAGERWAYLAND_H

#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QDBusInterface>
#include <QDBusArgument>
#include <QObject>
#include <QTimer>
#include "gamma-color-info.h"
#include "plugin-manager-interface.h"
#include "clib-syslog.h"
#include "gamma-manager-gtkconfig.h"
#include "gamma-manager-define.h"
#include "QGSettings/qgsettings.h"

class GammaManagerWayland: public ManagerInterface
{
    Q_OBJECT
public:
    GammaManagerWayland();
    GammaManagerWayland(GammaManagerWayland&)=delete;
    GammaManagerWayland&operator=(const GammaManagerWayland&)=delete;
public:
    ~GammaManagerWayland();
    static GammaManagerWayland *GammaManagerWaylandNew();

    virtual bool Start();
    virtual void Stop();
public Q_SLOTS:
    void doQtSettingsChanged(QString setKey);
    void doColorSettingsChanged(QString setKey);
private:
    void syncColorSetToKwin();
    bool isDarkMode(QString key);
private:
    QGSettings *m_pColorSettings;
    QGSettings *m_pQtSettings;
    QGSettings *m_pGtkSettings;
    UkuiGtkConfig *m_pukuiGtkConfig;

    bool m_darkModeChangedBySelf;
    static GammaManagerWayland *m_gammaWaylandManager;

};

#endif // GAMMAMANAGERWAYLAND_H
